====== Parameters ======

The model contains several parameters.  Many are simply assigned known values from the literature.  Others are "guessed" by fitting the model to observations.

====== Fixed parameters ======

These parameters have fixed values, taken from the literature whenever possible:
<phpinc=science/ebolamodel/tablefixedpars.php>

====== Fitted parameters ======

These parameters have been fitted to [[..:data:start | empirical data]]:
<phpinc=science/ebolamodel/tablefittedpars.php>

====== Derived parameters ======

The remaining parameters used in the model are derived from those above.

===== Hospitalization rate, $\phi$ =====

When I first started thinking about the ebola outbreak in the summer of 2014 I expected that the //hospitalization rate// --- the rate at which infectious individuals are discovered, isolated, and treated --- would change over time as awareness and vigilance increased.  I modeled hospitalization as a simple transition, 
\begin{eqnarray}
I & \xrightarrow{\phi}   & H,          & \text{(hospitalization)}
\end{eqnarray}
where the hospitalization rate $\phi$ roughly represents the effort affected countries put into discovering cases.  A larger $\phi$ means infected individuals are hospitalized more quickly.

It's not necessarily the case that "hospitalization" serves the dual purpose of //treatment// and //isolation//.  Early in the outbreak many health care workers were themselves infected: treatment without isolation.  On the other hand, some areas were quarantined without receiving effective care: isolation without treatment.  Nevertheless, for the sake of simplicity I assumed in my model that hospitalized cases were both effectively //isolated//, so that they no longer caused new infections; and were //treated//, changing their recovery and death rates (explained below).  
\begin{eqnarray}
H & \xrightarrow{0}   & H + L,          & \text{(isolation, no transmission)} \\
H & \xrightarrow{\rho_H}   & \emptyset, & \text{(recovery in hospital)} \\
H & \xrightarrow{\delta_H} & \emptyset. & \text{(death in hospital)} \\
\end{eqnarray}

Originally, I expected the hospitalization rate $\phi$ to increase from one level to another over time, so I modeled it as a sigmoid function with parameters for the starting level, final level, transition point, and rate of transition.  To my surprise, my first fits of these parameters suggested that $\phi$ was actually declining, so hospitalization rates were getting //worse//.  Eventually the pattern did reverse and $\phi$ increased but I saw that I would need a more complicated function to represent it.  Here were some of my considerations when choosing a functional form for $\phi$:
  * $\phi$ is strictly positive so it would probably work better to find a function for $\ln \phi$.
  * Ultimately, I still wanted a sigmoidal shape, $S(z) = \ln\phi_i + (\ln\phi_f - \ln\phi_i) / \left( 1 + \exp(-z) \right)$ where $z$ is a linear transformation of $t$.
  * I was particularly interested in the transition so I rescaled time, $z(t) = (t - t_m)/\sigma$.
  * Between the extremes I also wanted to be able to resolve other fluctuations so I added a polynomial, $P(z) = \sum_i a_i z^i$. 
  * I needed the influence of the polynomial to diminish far away from the transition so I bounded it with an envelope function, $E(z) = \exp[-\left| z \right|^env/2]$.

With all the above considerations I chose the following form for $\phi$:
\begin{equation}
\ln\phi(t) = S(z(t)) + E(z(t)) P(z(t)).
\end{equation}
===== Basic reproduction number =====

An important quantity to measure in an epidemic is the [[wp>basic reproduction number]], $R_0$, which is the average number of people each infected individual spreads the disease to.  The basic reproduction number, $R_0$, is significant because it tells us when the epidemic is "under control" or not.  When $R_0>1$ each infection creates more than one new infection so the disease expands rapidly.  As long as $R_0<1$ the epidemic is under control and is declining.  It is relatively easy to compute for our model because all of the relevant reactions involve only a single reactant, so they're all [[wp>Poisson point process | Poisson processes]]:
\begin{eqnarray}
I & \xrightarrow{\alpha} & I + L,      & \text{(transmission)} \\
I & \xrightarrow{\rho_I} & \emptyset,  & \text{(recovery)} \\
I & \xrightarrow{\phi}   & H,          & \text{(hospitalization)} \\
I & \xrightarrow{\delta} & \emptyset.  & \text{(death)} \\
\end{eqnarray}

Let's work through the derivation.  The rate of transmission (per infected) is just $\alpha$ so the probability of infection in an interval $dt$ is just $\alpha dt$.  This can only occur if the focal individual, is still infected.  The three processes that can switch the individual out of the infected state are Hospitalization, Recovery, or Death.  Being Poisson processes all have exponential waiting times so the probability of not having occurred within a period $t$ is $c(t) = \exp[-(\phi+\rho_I+\delta)t]$.

The basic reproduction number can be derived fairly easily: it is just the expected number of transmissions over all time,
\begin{eqnarray}
R_0 & = & \int_0^\infty c(t) \alpha dt \\
    & = & \alpha \int_0^\infty e^{-(\phi+\rho_I+\delta) t} dt \\ 
    & = & \frac{\alpha}{\phi+\rho_I+\delta}.
\end{eqnarray}

Another way to think about the result is to recognize that for Poisson processes the average amount of time spent in a state is just the reciprocal of the net rate constant for leaving the state.  That is, if $I\xrightarrow{r} ...$ (leaving state I) then the average time spent in state I is $T_I = 1/r$.  In our case $r=\phi+\rho_I+\delta$ so the expected number of transmissions while infectious is $R_0 = \alpha T_I$, which gives the same result as above.  

Again, the basic reproduction number, $R_0$, is an important measure of how "contained" the epidemic is: when $R_0>1$ ($R_0<1$) the disease is expanding (contracting).  So having a closed form solution is very convenient.

Note that the calculations here assume all the rate constants are just that --- constant.  But this model assumes that the hospitalization rate $\phi$ varies in time.  That's not a problem as long as it doesn't change much over the infectious period of any one person, $T_I$.  That should be okay for our model because $T_I$ is on the order of just a few days.  If necessary, we have a closed form for $\phi$ so we could try to calculate $R_0$ exactly (or if that fails we could try a perturbative approach) but it doesn't seem to be required.

As an aside, the model can be solved analytically for the case of //constant// rate constants.  Then the disease-free equilibrium ($L=I=H=0$) is stable precisely when $R_0<1$.

===== Case fatality rate =====

<WRAP center round todo 60%>
I'll explain how I derive the case fatality rate from my model in an upcoming post.  Stay tuned!
</WRAP>
